package indi.henry.weatherdemo.service;

import java.util.List;

import indi.henry.weatherdemo.entity.CityEntity;
import indi.henry.weatherdemo.model.WeatherResponse;

/**
 * Service interface specified for weather API
 * 
 * @author Henry Hu
 */
public interface WeatherService {

    /**
     * The method would return the stored cities from database to external
     */
    public List<CityEntity> getWeatherAllInfo();

    /**
     * The method would call the weather public API for current weather information
     * for target city by using Rest Template, and abstract the requested fields to
     * construct the weather response structure for output
     */
    public WeatherResponse getWeatherInfo(String city) throws RuntimeException;

    /**
     * The method would call the weather public API for city verification, if no
     * issue it would add the city to the database
     */
    public WeatherResponse addWeatherCity(String city) throws RuntimeException;

    /**
     * The method would call the weather public API for city verification, if no
     * issue it would add the city to the database
     */
    public void deleteWeatherCity(String city);
}
